package com.hb.core.pojo.expert.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hb.core.pojo.expert.dto.ExpertGroupDTO;
import com.hb.core.pojo.expert.dto.ExpertGroupMembersDTO;
import com.hb.core.pojo.expert.entity.ExpertGroup;
import com.hb.core.pojo.expert.entity.ExpertGroupMembers;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author ljs
 * @date 2022-2-10 13:58:19
 **/
public interface ExpertGroupMapper extends BaseMapper<ExpertGroup> {
    /**
     * 根据专家组ID查询对应的专家列表，并返回专家姓名
     *
     * @param expertGroup
     * @return
     */
    List<ExpertGroupMembersDTO> listExpertGroupMembers(@Param("query") ExpertGroup expertGroup);

    /**
     * 查询全部的专家组
     * @param expertGroupDTO
     * @return
     */
    List<ExpertGroup> listExpertGroup(@Param("query") ExpertGroupDTO expertGroupDTO);

    /**
     * 分页查询专家组
     * @param pages
     * @param expertGroupDTO
     * @return
     */
    Page<ExpertGroupDTO> pageExpertGroup(Page pages,@Param("query") ExpertGroupDTO expertGroupDTO);


    /**
     * 查询抽取的项目是否存在
     * @author tian
     * @date 2022-4-27 10:10
     * @param expertGroupDTO
     * @return java.lang.Integer
     */
    Integer countByProjectNameAndOrgId(ExpertGroupDTO expertGroupDTO);
}
